package com.newsappserver.userservice.mapper;


import com.newsappserver.userservice.dto.request.UserCreateRequest;
import com.newsappserver.userservice.dto.request.UserUpdateRequest;
import com.newsappserver.userservice.dto.response.UserResponse;
import com.newsappserver.userservice.entity.UserEntity;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

@Mapper(componentModel = "spring")
public interface UserMapper {
    UserEntity toUser(UserCreateRequest userCreateRequest);

    UserResponse toUserResponse(UserEntity userEntity);
    // 更新用户
    void updateUser(@MappingTarget UserEntity userEntity, UserUpdateRequest userUpdateRequest);
}
